package cc.autoapi.pucong.auto.flow.provider.api.manager;


import cc.autoapi.pucong.auto.flow.persistence.po.api.ApiParamsPo;
import cc.autoapi.pucong.auto.flow.persistence.repository.api.ApiParamsService;
import cc.autoapi.pucong.auto.flow.provider.api.entity.ApiParamsConvert;
import cc.autoapi.pucong.auto.flow.provider.api.entity.qo.ApiParamsQo;
import cc.autoapi.pucong.auto.flow.provider.api.entity.vo.ApiParamsVo;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author pucong
 * @description api参数信息 managerService 实现类
 * @create 2024-09-24
 */
@Service
@Slf4j
public class ApiParamsManager {

    @Resource
    private ApiParamsService apiParamsService;

    public List<ApiParamsVo> getList(ApiParamsQo qo) {
        List<ApiParamsPo> apiParamss = apiParamsService.list(qo.getApiId(), qo.getParamType());
        List<ApiParamsVo> apiParamsVos = ApiParamsConvert.INSTANCE.po2vos(apiParamss);
        return apiParamsVos;
    }
}
